﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zhp.Entity.SysEnum;

namespace Zhp.Model.Sys
{
    /// <summary>
    /// 
    /// </summary>
    public class MenuModel
    {
        /// <summary>
        /// 菜单ID
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public string ParentId { get; set; }

        /// <summary>
        /// 是否有子节点
        /// </summary>
        public bool HasChildren { get; set; }

        /// <summary>
        /// 菜单类型
        /// </summary>
        public MenuTypeEnum MenuType { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 接口地址
        /// </summary>
        public string ApiUrl { get; set; }

        /// <summary>
        /// 权限标识
        /// </summary>
        public string Permission { get; set; }

        /// <summary>
        /// 前端路由名称
        /// </summary>
        public string RouterName { get; set; }

        /// <summary>
        /// 前端路由地址
        /// </summary>
        public string RouterUrl { get; set; }

        /// <summary>
        /// 前端页面路径
        /// </summary>
        public string WebFilePath { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public decimal Order { get; set; }

        /// <summary>
        /// 菜单是否隐藏
        /// </summary>
        public bool Hidden { get; set; }
    }

    /// <summary>
    /// 
    /// </summary>
    public class MenuTreeModel
    {
        /// <summary>
        /// 菜单ID
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public string ParentId { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 菜单类型
        /// </summary>
        public MenuTypeEnum MenuType { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<MenuTreeModel> Children { get; set; }
    }

    /// <summary>
    /// 
    /// </summary>
    public class MenuQuery : PageModel
    {

    }

    /// <summary>
    /// 
    /// </summary>
    public class MenuCreate
    {
        /// <summary>
        /// 菜单ID
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public long? ParentId { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 菜单类型
        /// </summary>
        public MenuTypeEnum MenuType { get; set; }

        /// <summary>
        /// 接口地址
        /// </summary>
        public string ApiUrl { get; set; }

        /// <summary>
        /// 权限标识
        /// </summary>
        public string Permission { get; set; }

        /// <summary>
        /// 前端路由名称
        /// </summary>
        public string RouterName { get; set; }

        /// <summary>
        /// 前端路由地址
        /// </summary>
        public string RouterUrl { get; set; }

        /// <summary>
        /// 前端页面路径
        /// </summary>
        public string WebFilePath { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public decimal? Order { get; set; }

        /// <summary>
        /// 菜单是否隐藏
        /// </summary>
        public bool Hidden { get; set; }
    }

    /// <summary>
    /// 菜单数据
    /// </summary>
    public class HomeMenuTreeModel
    {
        /// <summary>
        /// 菜单ID
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public string ParentId { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 前端路由名称
        /// </summary>
        public string RouterName { get; set; }

        /// <summary>
        /// 前端路由地址
        /// </summary>
        public string RouterUrl { get; set; }

        /// <summary>
        /// 前端页面路径
        /// </summary>
        public string WebFilePath { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public decimal Order { get; set; }

        /// <summary>
        /// 菜单是否隐藏
        /// </summary>
        public bool Hidden { get; set; }

        /// <summary>
        /// 菜单类型
        /// </summary>
        public MenuTypeEnum MenuType { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<HomeMenuTreeModel> Children { get; set; }
    }


    /// <summary>
    /// 按钮数据
    /// </summary>
    public class ButtonModel
    {
        /// <summary>
        /// 按钮ID
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 按钮名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 按钮图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 权限标识
        /// </summary>
        public string Permission { get; set; }

        /// <summary>
        /// 接口地址
        /// </summary>
        public string ApiUrl { get; set; }
    }
}
